package com.todo.strategy.online.application.service;

import com.todo.common.common.entity.response.page.PageResult;
import com.todo.strategy.common.enums.StrategyStatusEnum;
import com.todo.strategy.online.application.entity.bo.StrategyDetailBO;
import com.todo.strategy.online.application.entity.bo.StrategyInfoBO;
import com.todo.strategy.online.application.entity.bo.UserStrategyCountBO;
import com.todo.strategy.online.application.entity.condition.StrategyInfoConditionBO;

import java.util.List;

/**
 * (StrategyInfo)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 00:19:49
 */
public interface StrategyInfoService {

    /**
     * 新增攻略详情信息
     *
     * @param strategyInfoBO
     * @return
     */
    Boolean insertStrategyInfo(StrategyInfoBO strategyInfoBO);

    /**
     * 更新攻略详情信息
     *
     * @param strategyInfoBO
     * @return
     */
    Boolean updateStrategyInfo(StrategyInfoBO strategyInfoBO);

    /**
     * 根据主键查询攻略信息
     *
     * @param id
     * @return
     */
    StrategyInfoBO queryStrategyInfoById(Long id);

    /**
     * 根据用户id和计划id查询攻略信息
     *
     * @param userId
     * @param planId
     * @return
     */
    StrategyInfoBO queryStrategyInfoPOByPlanId(Long userId, Long planId);

    /**
     * 根据主键删除信息
     *
     * @param id
     * @return
     */
    Boolean removeStrategyInfoById(Long id);

    /**
     * 更新攻略状态
     *
     * @param id
     * @param oldStatus
     * @param newStatus
     * @return
     */
    Boolean updateStrategyStatus(Long id, StrategyStatusEnum oldStatus, StrategyStatusEnum newStatus);

    /**
     * 多条件分页查询攻略信息
     *
     * @param strategyInfoCondition
     * @return
     */
    PageResult<StrategyInfoBO> queryStrategyInfoByCondition(StrategyInfoConditionBO strategyInfoCondition);


    /**
     * 根据主键查询攻略详情
     * 包含：攻略、清单、关联
     *
     * @param strategyId
     * @return
     */
    StrategyDetailBO queryStrategyDetailById(Long strategyId);

    /**
     * 根据主键查询攻略信息列表
     *
     * @param strategyIdList
     * @return
     */
    List<StrategyInfoBO> queryStrategyInfoByIdList(List<Long> strategyIdList);

    /**
     * 更新用户数量相关信息
     *
     * @param countBO
     * @return
     */
    Boolean updateUserStrategyCount(UserStrategyCountBO countBO);
}
